﻿<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title></title>
    <script>
        window.onload = function () {
            if (window.addEventListener) {
                window.addEventListener('storage', function(e) {
                    console.log(e);
                }, false);
            }
            localStorage.clear();
            localStorage.setItem("name", "存储的值");
            localStorage.setItem("name", "修改存储的值");
        }
       
    </script>
</head>
<body>

</body>
</html>